package com.archgeek.java.biz;

import com.google.common.base.Joiner;
import org.apache.commons.lang3.StringUtils;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

/**
 * @author pizhihui
 * @date 2024-01-23 18:43
 */
public class LabelOfflineWechatListDemo {
    public static void main(String[] args) throws IOException {

        List<String> strings = Files.readAllLines(Paths.get("/Users/pizhihui/ProjectsIdea/code-bigdata/code-00java/src/main/resources/3.txt"));


        Set<String> sets = new HashSet<>();
        for (String string : strings) {
            String[] split = string.split(",");
            for (String s : split) {
                if (StringUtils.isNotBlank(s)) {
                    sets.add(s);
                }
            }
        }

        String join = Joiner.on(" ").join(sets);
        System.out.println(join);


    }

}
